<div class="modal-header">
  <div class="modal-title">{{ record.username + '登录限制' }}</div>
</div>
<!--<nz-spin *ngIf="!i" class="modal-spin"></nz-spin>-->
<div>
  <form nz-form [formGroup]="validateForm">
    <!--    <input nz-input hidden formControlName="ID" />-->
    <div nz-row [nzGutter]="24">
      <div nz-col [nzSpan]="20">
        <nz-form-item>
          <nz-form-label [nzSpan]="8" nzFor="allowIp"><span style="color: green">授权ip</span></nz-form-label>
          <nz-form-control [nzSpan]="16">
            <textarea
              nz-input
              [rows]="3"
              placeholder="这里输入授权ip，每个ip用空格或逗号或换行隔开，留空或*表示全部通过"
              formControlName="allowIp"
              [(ngModel)]="allowIp"
            ></textarea>
          </nz-form-control>
        </nz-form-item>
      </div>

      <div nz-col [nzSpan]="20">
        <nz-form-item>
          <nz-form-label [nzSpan]="8" nzFor="nickname"><span style="color: red">禁止ip</span></nz-form-label>
          <nz-form-control [nzSpan]="16">
            <textarea
              nz-input
              [rows]="3"
              placeholder="这里输入禁止ip，每个ip用空格或逗号或换行隔开，*表示全部禁止，留空则不禁止"
              formControlName="banIp"
              [(ngModel)]="banIp"
            ></textarea>
          </nz-form-control>
        </nz-form-item>
      </div>
    </div>
  </form>
</div>

<div class="modal-footer">
  <button nz-button type="button" (click)="close()">关闭</button>
  <button
    nz-button
    type="submit"
    nzType="primary"
    (click)="save(validateForm.value)"
    [disabled]="!validateForm.valid"
    [nzLoading]="http.loading"
    >保存
  </button>
</div>
